package com.example.todolist.dto.business;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author: yoonada
 * @email: m15602498163@163.com
 * @create: 2022-02-25 11:07
 * @description: 创建规划
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PlanCreateDTO {

    @NotEmpty(message = "标题是必填的")
    private String title;


    private String content;

    @NotNull(message = "规划开始时间是必填的")
    @JsonFormat( pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private LocalDateTime planStartTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @NotNull(message = "规划结束时间是必填的")
    private LocalDateTime planEndTime;

    @NotNull(message = "事项类别")
    private String planType;

}